/////////////////////////////////////////////////////////////////////////////////////////
// Luminary Micro / Circuit Cellar 2007 Design Contest
// Entry LM1732
//
// FAT file system module include file
// Taken from ChaN (http://elm-chan.org/index_j.html) and simplified 
/////////////////////////////////////////////////////////////////////////////////////////

#ifndef _GLOBALS


/////////////////////////////////////////////////////////////////////////////////////////
// CONSTANTS
/////////////////////////////////////////////////////////////////////////////////////////
#define	FALSE	0
#define	TRUE	1

#define	PUSH_BUTTON	GPIO_PIN_4								// LM3S811 Evaluation Board user push button
#define	USER_LED	GPIO_PIN_5								// LM3S811 Evaluation Board user LED
#define	HOST_CS		GPIO_PIN_5								// Host Chip Select
#define	HOST_EN		GPIO_PIN_7								// Host Signals Enable

#define	SD_PORT		GPIO_PORTA_BASE							// SD Card Port
#define	SD_CLK		GPIO_PIN_2								// SD Card Clock
#define	SD_CS		GPIO_PIN_3								// SD Card Chip Select
#define	SD_DI		GPIO_PIN_4								// SD Card Data OUT
#define	SD_DO		GPIO_PIN_5								// SD Card Data IN

#define SOCKPORT	GPIO_PORTD_BASE							// SD Card Socket Contact Port
#define	SOCKWP		GPIO_PIN_0								// Write Protect Switch
#define	SOCKINS		GPIO_PIN_1								// Card Detect Switch


/////////////////////////////////////////////////////////////////////////////////////////
// MACROS
/////////////////////////////////////////////////////////////////////////////////////////
#define SELECT()	GPIOPinWrite(SD_PORT, SD_CS, 0);		// SD Card CS = 0
#define	DESELECT()	GPIOPinWrite(SD_PORT, SD_CS, SD_CS);	// SD Card CS = 1
//#define MAKE_SSI_INPUT		GPIODirModeSet(SHT11PORT, SHT_DATA, GPIO_DIR_MODE_IN)
//#define MAKE_SSI_SSI		GPIODirModeSet(SHT11PORT, SHT_DATA, GPIO_DIR_MODE_OUT)
#define HOST_DISABLE		GPIOPinWrite(GPIO_PORTC_BASE, HOST_EN, HOST_EN)
#define HOST_ENABLE			GPIOPinWrite(GPIO_PORTC_BASE, HOST_EN, 0)



/////////////////////////////////////////////////////////////////////////////////////////
// TYPES
/////////////////////////////////////////////////////////////////////////////////////////
typedef unsigned char	BOOL;
typedef unsigned char	BYTE;
typedef unsigned short	WORD;
typedef unsigned long	DWORD;

#define _GLOBALS
#endif
